<template>
  <el-button type="primary" class="but-item" v-for="(item,index) in jump" :key="index" @click="gotoClick(item)">{{item}}</el-button>
</template>

<script setup lang="ts">
import { reactive } from 'vue';
import { useRouter } from 'vue-router'

const jump=reactive(['demo','text'])
const router = useRouter()
console.log(router)

const gotoClick = (item) => {
  router.push(`/${item}`)
}
</script>

<style scoped>
.but-item{
  margin: 20px;
}
</style>
